package com.sc.base.admin.common.utils;

import java.util.regex.Pattern;

/**
 * Created by Administrator on 2018/7/26.
 */
public class StringUtils {
    public static boolean isInteger(String str) {
        if(str==null) return false;
        Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$");
        return pattern.matcher(str).matches();
    }
    public static boolean isGuid(String str) {
        if(str==null) return false;
        Pattern pattern = Pattern.compile("^[A-F0-9]{8}(-[A-F0-9]{4}){3}-[A-F0-9]{12}$",Pattern.CASE_INSENSITIVE);
        return pattern.matcher(str).matches();
    }
}
